using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using SCSFContrib.CompositeUI.WPF.Workspaces;

namespace SCSFContrib.CompositeUI.WPF.Visualizer
{
	/// <summary>
	/// Implements a visualizer window for WPF-based CAB applications.
	/// </summary>
	public partial class VisualizerWindow : System.Windows.Window
	{
		/// <summary>
		/// Constructs an instance of <c>VisualizerWindow</c>.
		/// </summary>
		public VisualizerWindow()
		{
			InitializeComponent();

			//this cannot be done in XAML within VS 2005 because TabWorkspace is in the same assembly and the assembly is strongly
			//named. Seems to be a bug in the XAML compiler
			TabWorkspace tabWorkspace = new TabWorkspace();
			tabWorkspace.Name = "MainWorkspace";
			Content = tabWorkspace;
		}

		/// <summary>
		/// Called when an attempt is made to close the window.
		/// </summary>
		/// <param name="e">
		/// Event arguments.
		/// </param>
		protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
		{
			e.Cancel = true;
			WindowState = WindowState.Minimized;
			base.OnClosing(e);
		}
	}
}